﻿<%@ Page Title="" Language="C#" MasterPageFile="~/Views/Shared/site.Master" Inherits="System.Web.Mvc.ViewPage<IEnumerable<fivescomplement.Models.GetDefaultQuestionSets_Result  >>"%>

<asp:Content ID="Content1" ContentPlaceHolderID="TitleContent" runat="server">
	Questions
</asp:Content>

<asp:Content ID="Content2" ContentPlaceHolderID="MainContent" runat="server">

    <h2>Default Question Sets</h2>

            <% using (Html.BeginForm()) { %>
                <fieldset>
                    <% int InstitutionID;%>
                    <% InstitutionID = Convert.ToInt32(Session["InstitutionID"]); %>
                    <%: Html.Hidden("InstitutionID", InstitutionID)%>
                    <% int test;%>
                    <% int QuestionSet;%>
                    <% test = 1;%>
                    <% QuestionSet = 0;%>

                    <table>
                        <tr>
                            <th width="150">
                                 Select
                            </th>
                            <th width="500">
                                 Question
                            </th>
                            <th width="150">
                                 QuestionType
                            </th>
                        </tr>

                    <% foreach (var item in Model)
                       { %>
                            <% if (QuestionSet != item.QuestionSet)
                               { %>
                               <% QuestionSet = item.QuestionSet;%>
                                     </table>
                                     <table>                                           
                                        <tr>
                                        <td width="150">
                                        <%: Html.RadioButton("QuestionSetRadioButton", item.QuestionSet, false)%> Question Set
                                        </td>
                            <% } else
                               { %>
                               <td width="150">
                               </td>
                               <% } %>
                       <td width="500">
                            <%: item.Question%>
                       </td>
                       <td width="150">
                                <% if (item.QuestionTypeID == 1)
                                    { %> 
                                    Likert scale 1-5
                                <% } %>

                                <% if (item.QuestionTypeID == 2)
                                   { %> 
                                    True/False
                                <% } %>

                                <% if (item.QuestionTypeID == 3)
                                   { %>
                                    Free Response
                                <% } %>
                       </td>
                        </tr>
                       <% test += 1;%>
                    <% } %>

                    </table>
                    <p>
                        <input type="submit" value="Add to Institution" />
                    </p>

                </fieldset>
        <% } %>


</asp:Content>
